import { createRouter, createWebHistory } from 'vue-router'
//导入组件
import UserLoginVue from '@/views/LoginView.vue'
import ChannelView from '@/views/ChannelView.vue'
import ChannelView2 from '@/views/ChannelView2.vue'
import CommentView from '@/views/CommentView.vue'

//定义路由关系
const routes = [
    { name:'userLogin',path: '/', component: UserLoginVue },
    { name:'channel',path: '/list', component: ChannelView },
    { name:'channel2',path: '/list2', component: ChannelView2 },
    { name:'comment',path: '/comment', component: CommentView },
]

//创建路由器
const router = createRouter({
    history: createWebHistory(),
    routes: routes
})

//导出路由
export default router
